﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace HowtoScene.GO4N
{
    public struct Coordinate
    {
        private double _x;
        private double _y;
        private double _z;
        private double _m;
        private bool _hasZ;
        private bool _hasM;
       
        public Coordinate(double x, double y, double z, double m)
        {
            _x = x;
            _y = y;
            _z = z;
            _m = m;
            _hasZ = true;
            _hasM = true;
        }
        public Coordinate(double x, double y, double z)
        {
            _x = x;
            _y = y;
            _z = z;
            _m = 0;
            _hasZ = true;
            _hasM = false;
        }
        public Coordinate(double x, double y)
        {
            _x = x;
            _y = y;
            _z = 0;
            _m = 0;
            _hasZ = false;
            _hasM = false;
        }
        
        public double X
        {
            get { return _x; }
            set { _x = value; }
        }
        public double Y
        {
            get { return _y; }
            set { _y = value; }
        }
        public double Z
        {
            get { return _z; }
            set { _z = value; }
        }
        public double M
        {
            get { return _m; }
            set { _m = value; }
        }
        public bool HasZ
        {
            get { return _hasZ; }
            set { _hasZ = value; }
        }
        public bool HasM
        {
            get { return _hasM; }
            set { _hasM = value; }
        }
        public void Normalize()
        {

        }
        public void Normalize2D()
        {

        }
        public void Normalize3D()
        {

        }
        public void Normalize4D()
        {

        }
        public double Length
        {
            get
            {
                return 0;
            }
        }
        public static Coordinate operator +(Coordinate first, Coordinate second)
        {
            return first;
        }
        public static Coordinate operator -(Coordinate first, Coordinate second)
        {
            return first;
        }
        public static Coordinate operator *(Coordinate first, double scale)
        {
            return first;
        }
        public static Coordinate operator *(double scale,Coordinate first)
        {
            return first;
        }
        public static double operator *(Coordinate first, Coordinate second)
        {
            return 0;
        }
        public static Coordinate operator ^(Coordinate first, Coordinate second)
        {
            return first;
        }
    }
}
